CC				= g++

OBJECT			= vll_server.o \
				  vll_server_setting.o \
				  vll_server_acceptor.o 				  
#				  vll_server_mysql.o \
#				  vll_server_php.o \
#				  vll_server_client.o 
				  
SOURCES			= $(OBJECT:.o=.c)

LIB_SOURCES_DIR	= ../vll_common_lib/
LIB_OBJECT		= lib_log.o lib_common.o lib_network.o lib_str.o
LIB_SOURCES		= $(LIB_SOURCES_DIR)lib_log.c \
		 		 $(LIB_SOURCES_DIR)lib_common.c \
				  $(LIB_SOURCES_DIR)lib_network.c \
				  $(LIB_SOURCES_DIR)lib_str.c

INC_COMMON_LIB	= -I../vll_common_lib

COMP_OPT		= -c -g -Wall

TARGET			= vll_streaming_server

$(TARGET) : $(OBJECT) $(LIB_OBJECT)
	$(CC) $(OBJECT) $(LIB_OBJECT) -o $(TARGET) -Wall -lpthread -D_REENTRANT

clean:
	rm -rf $(TARGET) $(OBJECT) $(LIB_OBJECT)

$(OBJECT) : $(SOURCES)
	$(CC) $(COMP_OPT) $(SOURCES) $(INC_COMMON_LIB)

$(LIB_OBJECT) : $(LIB_SOURCES)
	$(CC) $(COMP_OPT) $(LIB_SOURCES) $(INC_COMMON_LIB)

